package cn.mbz.blog.commons.exception;


import cn.mbz.blog.commons.web.State;

public class ServiceException extends RuntimeException {

    private State state;

    public ServiceException(State state, String message) {
        super(message);
        if (state == null) {
            throw new IllegalArgumentException("状态码为空");
        }
        this.state  = state;
    }

    public State getState() {
        return state;
    }
}
